Xbasic

*REVERSE_WORDS Function

Syntax

New_List as C = *REVERSE_WORDS(C string[,C delimiter])

Arguments

New_List

A delimited list of entries.

string

A delimited list of entries.

delimiter

Optional. Default = CR-LF. The character(s) that separate the list entries.

Description

Reverse the order of words in a string - default delimiter is cr-lf.

Discussion

The *REVERSE_WORDS() function reverses the order of a list of entries.

Example

dim list as C = "a,b,a,c,d"
? *reverse_words(list, ",")
= "d,c,a,b,a"

See Also